/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DataStructuresThreads;

import Sorting.Main;
import com.sun.j3d.utils.geometry.Box;
import javax.media.j3d.Transform3D;
import javax.media.j3d.TransformGroup;
import javax.vecmath.Vector3f;

/**
 *
 * @author rafael
 */
public class StackFactory {

    public static float x = 0.4f, y = 0.2f, z = 0.2f;
    public static Vector3f positionVector = new Vector3f(0.8f, 0.8f, 0.0f);

    public static TransformGroup createStackElement(int value) {

        Box stackElement = new Box(x, y, z, Main.criarApp());

        stackElement.setCapability(Box.ENABLE_APPEARANCE_MODIFY);
        Transform3D tfBox = new Transform3D(); // logo após, incrementando a distância para a próxima esfera.
        tfBox.setTranslation(positionVector);

        positionVector.y -= 0.2f;
        TransformGroup tgBox = new TransformGroup(tfBox);
        tgBox.addChild(stackElement);
        
        return tgBox;

    }
}
